<template>
    <dev>
      <el-form :model="queryParams" inline>
        <el-form-item label="商品分类">
            <el-cascader :options="[]" v-model="queryParams.classify"></el-cascader>
        </el-form-item>
        <el-form-item label="商品搜索">
            <el-input v-model="queryParams.goodsName" style="width: 300px;" 
            placeholder="请输入商品名称，关键字，商品ID">
            <template #append>
                <el-icon :size="16"><Search /></el-icon></template>
            </el-input>
        </el-form-item>
        <div>
            <el-button type="primary" @click="toAddPage">添加商品</el-button>
            <el-button type="" @click="dowloadFile">导出</el-button>
        </div>
      </el-form>
    </dev>
</template>

<script setup lang="ts" name="searchTitle">
import { defineAsyncComponent, reactive, ref, onMounted } from 'vue';
import router from "@/router";

const activeName = ref('sell')

const queryParams=ref({
    classify:null,
    goodsName:null
})

function toAddPage(){
    router.push( {path:"/goods/goodsEdit",query:{id:1}})
}

function dowloadFile(){
    window.location.href="http://localhost:8080/goods/dowloadFile"
}

</script>
<style scoped lang="scss">

</style>